package lab02.test02;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();


        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {

            list.add(scanner.nextInt());
        }

        int k = scanner.nextInt();

        if (list.contains(k))
            System.out.println(list.indexOf(k));
        else
            System.out.println(-1);



    }
}
